<template>
    <div class="CameraFlyTo">
        <cesium-viewer @viewerAlready="viewerAlready"/>
    </div>
</template>
<script>
    import CesiumViewer from "../../CesiumViewer";
    export default {
        name: "CameraFlyTo",
        //import引入的组件需要注入到对象中才能使用",
        components: {CesiumViewer},
        methods: {
            //初始化Cesium
            viewerAlready() {
                window.viewer.camera.flyTo({
                    destination: Cesium.Cartesian3.fromDegrees(
                        87.5531,
                        27.5917,
                        5000
                    ),
                    orientation:{
                        // 指向
                        heading:0.0,
                        // 视角
                        pitch:0.0,
                        roll:0.0
                    }
                });
            }
        }
    };
</script>
